Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Figma variables from JSON files #1884

Merged
merged 75 commits into from
Oct 8, 2024
Merged

Update Figma variables from JSON files #1884

merged 75 commits into from
Oct 8, 2024

Conversation

aweell
Copy link
Collaborator

@aweell aweell commented Sep 11, 2024

Description

This feature allows the creation of figma variables by running a script in the repository.

Screenshot 2024-09-16 at 10 30 55

https://www.tldraw.com/s/v2_c_snnVQbmyyGW4BzwXyXPwZ?d=v6816.-947.4025.2072.page

This script should:

  • Create a collection palette en each skin file
  • Create the collections Mode and Brand in a middleware file

This middleware file is the one that will be used to link variables in all Mistica components

Each collection will appear as a selector in the UI:

  • Brand: change the selection to one of the available brands
  • Mode: change the color mode to light or dark

Appart from the tokens defined in JSON files, we need to create figma-oriented tokens:

  • Font family: change the font-family per brand
  • Icon set: change the icon set used per brand

Test file with variables created:

https://www.figma.com/design/wlnMwpneZheC7CskSJAw4g/Middleware-POST-test-V2?node-id=0-1&node-type=canvas&t=scPU5BKt3mgO0tCf-0

package.json Outdated Show resolved Hide resolved
@aweell aweell linked an issue Sep 26, 2024 that may be closed by this pull request
Copy link
Contributor

@marcoskolodny marcoskolodny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! Here you have web-core backlog in case you feel like replacing us as developers from now on 😆

@aweell aweell merged commit 9fb7c31 into production Oct 8, 2024
7 checks passed
@aweell aweell deleted the aweell-figma-api branch October 8, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Script to update variables via Figma API
3 participants